<template>
  <div class="product-card" @click="$emit('click')">
    <div class="product-icon">
      <i :class="product.icon"></i>
    </div>
    <h3>{{ product.title }}</h3>
    <p>{{ product.description }}</p>
    <div class="product-price">{{ product.price }}</div>
  </div>
</template>

<script setup>
defineProps({
  product: {
    type: Object,
    required: true
  }
})

defineEmits(['click'])
</script>

<style scoped>
.product-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

@media (min-width: 768px) {
  .product-card {
    padding: 2rem;
  }
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-icon {
  font-size: 2.5rem;
  color: #3498db;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .product-icon {
    font-size: 3rem;
  }
}

.product-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

@media (min-width: 768px) {
  .product-card h3 {
    font-size: 1.5rem;
  }
}

.product-card p {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .product-card p {
    font-size: 1rem;
  }
}

.product-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #e74c3c;
}

@media (min-width: 768px) {
  .product-price {
    font-size: 1.3rem;
  }
}
</style>
